package guoanmaker.operator.business.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import guoanmaker.operator.business.model.OperatorActivityPrice;
import guoanmaker.operator.business.service.OperatorActivityPriceServiceInterface;
import guoanmaker.operator.helper.common.AjaxJson;
import guoanmaker.operator.helper.common.abstractobj.ApiController;
import io.swagger.annotations.ApiOperation;

/**
 *  
 *
 * @author wanghongwei 
 * @ClassName: OperatorActivityPriceController
 * @Description: OperatorActivityPriceController 
 * @date 2017/12/13 上午10:45
 */
@RestController
@RequestMapping(ApiController.OPERATOR_ACTIVITY_PRICE)
public class OperatorActivityPriceController {
	@Autowired
	private  OperatorActivityPriceServiceInterface operatorActivityPriceServiceInterface;

	
	 /** 
	  * @Title: saveActivityPrice
	  * @Description: 新增/修改保存活动订单价格
	  * @param: saveActivityPrice   
	  * @return AjaxJson    
	  * @throws 
	  */
	 @ApiOperation(value = "保存活动订单价格", notes = "保存活动订单价格")
	 @PostMapping(value = "saveActivityPrice")
     public AjaxJson saveActivityPrice(@RequestBody OperatorActivityPrice activityPrice) {
		 AjaxJson ajaxJson=new AjaxJson();
		 return ajaxJson.setSuccess(true).setStatus(200).setData(operatorActivityPriceServiceInterface.savaActivityPrice(activityPrice));
	 }
	
	 /** 
	  * @Title: DeleteActivityPrice
	  * @Description: 删除活动订单价格
	  * @param: DeleteActivityPrice   
	  * @return AjaxJson    
	  * @throws 
	  */
	 @ApiOperation(value = "删除活动订单价格", notes = "删除活动订单价格")
	 @PostMapping(value = "DeleteActivityPrice")
     public AjaxJson DeleteActivityPrice(@RequestParam String id) {
		 AjaxJson ajaxJson=new AjaxJson();
		 operatorActivityPriceServiceInterface.DeleteActivityPrice(id);
		 return ajaxJson.setSuccess(true).setStatus(200).setData(null).setMsg("删除成功");
	 }
	 
	 
	 /** 
	  * @Title: selectActivityPrice
	  * @Description: 查询活动订单价格
	  * @param: selectActivityPrice   
	  * @return AjaxJson    
	  * @throws 
	  */
	 @ApiOperation(value = "查询活动订单价格", notes = "查询活动订单价格")
	 @PostMapping(value = "selectActivityPrice")
     public AjaxJson selectActivityPrice(@RequestParam String id) {
		 AjaxJson ajaxJson=new AjaxJson();
		 return ajaxJson.setSuccess(true).setStatus(200).setData(operatorActivityPriceServiceInterface.selectOperatorActivityPrice(id));
	 }
	
	
	
}
